/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package negocio;

import DAO.TelefoneJpaController;
import dominio.Telefone;

/**
 *
 * @author gilcemar e naliane
 */
public class TelefoneNegocio {
    private TelefoneJpaController tJC = new TelefoneJpaController();

    public void incluirTel (Telefone telefone)
    {
        try
        {
            tJC.create(telefone);
        }catch (Exception e)
        {
            e.getStackTrace();
        }
    }

    public void alterarTelefoneDAO (Telefone telefone)
    {
        try
        {
            tJC.edit(telefone);
        }catch (Exception e)
        {
            e.getStackTrace();
        }
    }

    public Telefone pesquisarTelefone (String cpf)
    {
        try
        {
            return tJC.findTelefone(cpf);
        }catch (Exception e)
        {
            e.getStackTrace();
            return null;
        }
    }

}
